# 添加源文件到变量
aux_source_directory (./smart/ SRC_SMART_LIST)               

# 指定库路径
link_directories(
    ${PROJECT_SOURCE_DIR}/inc/logger/
    ${PROJECT_SOURCE_DIR}/inc/clocker/
    ${PROJECT_SOURCE_DIR}/lib/nanomsg/arm_lib/
    ${PROJECT_SOURCE_DIR}/lib/nanomsg/x86_lib/
)

# 链接静态库
link_libraries(clocker logger)

# 生成可执行文件并链接动态库
add_executable(tst_net_pubsub_run tst_net_pubsub.cpp ${SRC_SMART_LIST})
target_link_libraries (tst_net_pubsub_run pthread nanomsg)

# 生成可执行文件并链接动态库
add_executable(tst_net_pair_run tst_net_pair.cpp ${SRC_SMART_LIST})
target_link_libraries (tst_net_pair_run pthread nanomsg)

# 重定向可执行文件输出文件位置
set(EXECUTABLE_OUTPUT_PATH ${PROJECT_SOURCE_DIR}/out/nanomsg)
